fix(review): suppress owned activity churn - #1007
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 5:05 AM ET / 09:05 UTC. ClawSweeper reviewWhat this changesThe branch records source, timeline, pull-head, and review-activity receipts so ClawSweeper can avoid re-reviewing items changed only by its own GitHub comments or labels while preserving review for genuine activity. Merge readinessThis PR remains necessary because it is the only open candidate fix for the concrete scheduler-churn report at #1006. Its structural-receipt approach is evidence-backed and fail-open, but GitHub reports a dirty merge and current Priority: P2 Review scores
Verification
How this fits togetherClawSweeper schedules and caches reviews of GitHub issues and pull requests, then its apply lane publishes durable comments and labels or closes eligible items. This change carries post-publication activity evidence through scheduling, cache reuse, reports, and apply freshness checks so bot activity does not trigger another expensive review. flowchart LR
A[GitHub issue or pull request] --> B[Review scheduler]
B --> C[Item context snapshot]
C --> D[Structural cache]
D --> E[Codex review]
E --> F[Report receipt]
F --> G[Apply comments and labels]
G --> A
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase the structural-receipt design onto current main, preserve fail-open behavior for incomplete or changed snapshots across the split modules, and land it only after focused regressions plus a fresh current-head live proof confirm both owned activity reuse and real activity invalidation. Do we have a high-confidence way to reproduce the issue? Yes — the linked issue and PR body provide a concrete live GitHub ordering case, and the affected scheduler and structural-cache paths are identifiable on current main. This read-only review did not execute another live workflow. Is this the best way to solve the issue? Unclear until rebased — durable structural receipts are the appropriate fail-open direction, but this branch cannot yet demonstrate that the same guarantees survive the current apply and review architecture split. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2d1a40bfa643. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
Historical RCA: why the earlier fixes did not stop the review stormShort version: no single recent PR introduced the whole failure. A latent timestamp-provenance ambiguity dates to the April scheduler work; later throughput changes amplified it from an occasional redundant review into a visible storm. Timeline
Why #970 and #992 were insufficient
Why the revised PR closes the gapThe original PR head used exact timestamp equality as ownership evidence. Review identified that as unsafe because independent target activity can share GitHub's second-level timestamp. Current head So the attribution is:
This also explains why the system appeared healthy before the July scaling work: the false-positive edge existed, but the older scheduler did not have the cadence and throughput to hammer it repeatedly. |
ca43c93 to
84160ed
Compare
|
@codex review |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
To use Codex here, create a Codex account and connect to github. |
|
@clawsweeper re-review |
What Problem This Solves
Scheduled hot intake can repeatedly run a full review on an unchanged issue or PR after ClawSweeper updates its own durable review comment or labels. GitHub may publish the item
updated_atafter the local sync timestamp, so bot-owned activity can be mistaken for fresh target activity.Fixes #1006.
Why This Change Was Made
Production run https://github.com/openclaw/clawsweeper/actions/runs/30704608131 reviewed
openclaw/clickclack#117at unchanged headd26c11abba773132c51defb6e647db3a69610003. The review completed at14:52:41Z, the durable comment synced at14:53:28Z, and GitHub advanced the PRupdated_atto14:53:29Z. Scheduled hot intake then treated that server-side timestamp as uncaptured activity and ran another full review with zero cache hits.The original version of this PR persisted the post-mutation timestamp and treated exact equality as ownership. Review correctly identified that as unsafe: an independent target-side update can share GitHub's second-level timestamp.
The revised design keeps the timestamp only as an observation and requires a complete structural ownership receipt before suppressing work:
updated_atalone;Fresh and cache-hit reports now persist
review_timeline_revision, allowing exact same-second discrimination without weakening fail-open behavior.User Impact
Evidence
Exact reviewed head:
84160ed710bb1dae8a14115a2babdeb823b81056Base:
03f0344d21bf9ac724ff6d1d4a619308aa9fa6d6pnpm run checkpassed: static checks, production and repair builds, dashboard build, lint, changed coverage, and the full 217-file test/coverage suite.git diff --check origin/main...HEADpassed.review_timeline_revisionand both-direction regressions.Current-head live GitHub proof
The disposable exact-head transcript is inspectable at PollyBot13#2 (comment).
Using the literal head and base above, the exact-head build captured live GraphQL structural records around two GitHub mutations:
updatedAtwhile the filtered structural source revision remained identical. The scheduler admitted structural verification and the structural cache returnedhit.source_changed.The proof PR is closed and disposable. It touched no production records, queues, review reports, workflows, or merge state.
Original production-ordering proof
The earlier disposable run remains inspectable at PollyBot13#1 (comment). It demonstrates the original delayed GitHub timestamp ordering on the first implementation head. The current-head proof above supersedes it for the revised structural-receipt behavior.
AI-assisted
Implemented and reviewed with Codex. Production GitHub state, repository history, both disposable proofs, the full local gate, and two independent committed-range reviews were used as evidence.